
package gui;

import java.awt.Color;
import java.awt.Rectangle;
import gui.CommitedFrame;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JButton;

public class AreUSure extends JFrame{
	private JPanel AreUsu = null;
	private JLabel jLabelQ = null;
	private JButton jButtonYes = null;
	private JButton jButtonNo = null;
	
	
	
	public AreUSure() {
		super();
		initialize();
	}

	/**
	 * This method initializes AcademicFrame 
	 */
	private void initialize() {
		this.setSize(300, 200);
		this.setContentPane(Commitform());
		this.setTitle("Blocking User");			
	}

	private JPanel Commitform() {
		if (AreUsu == null) {
			jLabelQ = new JLabel();
			jLabelQ.setBounds(new Rectangle(31, 7, 216, 60));
			jLabelQ.setText("ARE YOU SURE YOU WANT TO BLOCK THIS USER?");
			AreUsu = new JPanel();
			AreUsu.setLayout(null);

			AreUsu.add(jLabelQ, null);
			AreUsu.add(getJButtonYes(), null);
			AreUsu.add(getJButtonNo(), null);
			 


		}
		return AreUsu; 
	}

	/**
	 * This method initializes jButtonYes	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonYes() {
		if (jButtonYes == null) {
			jButtonYes = new JButton();
			jButtonYes.setBounds(new Rectangle(44, 90, 77, 49));
			jButtonYes.setText("Yes");
			jButtonYes.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					
					CommitedFrame Commit = new CommitedFrame();
					Commit.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					Commit.setSize( 1000,720 ); // set frame size
					Commit.setResizable(true);
					Commit.setVisible( true ); // display frame
					AreUSure.this.dispose();
				}	
			});
		}
		return jButtonYes;
	}

	/**
	 * This method initializes jButtonNo	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonNo() {
		if (jButtonNo == null) {
			jButtonNo = new JButton();
			jButtonNo.setBounds(new Rectangle(163, 90, 75, 48));
			jButtonNo.setText("No");
			jButtonNo.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					AreUSure.this.dispose();
				}
			});
		}
		return jButtonNo;
	}
	
}
